﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StyleMVVM.Validation.Impl.Method
{
	public class BaseMethodRule<T> : IValidationRule
	{
		protected IEnumerable<string> standards;
		protected IEnumerable<string> dependentProperties;

		public BaseMethodRule(string name, IEnumerable<string> standards, IEnumerable<string> dependentProperties)
		{
			this.standards = standards;
			this.dependentProperties = dependentProperties;

			Namespace = "Method|" + typeof(T).FullName;
			Name = name;
		}

		public string Namespace { get; protected set; }

		public string DisplayName { get; protected set; }

		public string Name { get; protected set; }

		public virtual IEnumerable<string> DependentProperties()
		{
			return dependentProperties;
		}

		public virtual IEnumerable<string> Standards()
		{
			return standards;
		}
	}
}